package com.czk.model.proxy.dynamincproxy.practice2;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/10/2 19:51
 */
public class Client {
    public static void main(String[] args) {
        Durant durant = new Durant();
        ProxyFactory factory = new ProxyFactory(durant);
        Human proxy = (Human) factory.getProxyObject();
        proxy.speak();
        System.out.println("第二种方式===========");
        Human proxy1 = (Human) ProxyUtil.getProxy(durant);
        proxy1.speak();
    }
}
